const webp = require('webp-converter');

const fs = require('fs');
const path = require('path');

let fileList = fs.readdirSync('./images')

console.log(fileList)

let result = webp.cwebp(path.join(__dirname,'images',fileList[0]),'test.webp',"-q 80",logging="-v")

result.then(res => {
    console.log(res)
})